package com.grouppurchase.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("traditional_groups")
@ApiModel("传统团购实体")
public class TraditionalGroup extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("团购ID")
    private Long id;

    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("团购编号")
    private String groupNo;

    @ApiModelProperty("成团目标人数")
    private Integer targetSize;

    @ApiModelProperty("当前参团人数")
    private Integer currentSize;

    @ApiModelProperty("状态：active进行中、success已成团、failed已失败")
    private String status;

    @ApiModelProperty("过期时间")
    private LocalDateTime expiresAt;
}
